FROM nginx

MAINTAINER MingXiangXue <MingxiangXue@gmail.com>

RUN \
	apt-get update && \
	apt-get install -y vim

# remove link file, in order to create regular file, because `RUN ln -sf /dev/stdout /var/log/nginx/access.log`, `RUN ln -sf /dev/stderr /var/log/nginx/error.log`
RUN rm -f /var/log/nginx/access.log /var/log/nginx/error.log

# Setup Volume
VOLUME ["/etc/nginx", "/usr/share/nginx/html"]

# Expose Ports
EXPOSE 443
EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]